package business;

import java.io.Serializable;
import java.util.ArrayList;

/**
 *
 * @author Eduardo
 */
public class IndexItem implements Serializable {
    
    private int docReference;
    private int ocurrences;

    public IndexItem() {
    
    }

    public IndexItem(int docReference)
    {        
        this.docReference = docReference;
        this.ocurrences = 0;
    }

    public IndexItem(int docReference, int position)
    {
        this.docReference = docReference;
        this.ocurrences ++;
    }

    public void addOcurence()
    {
        this.ocurrences ++;
    }
    

    @Override
    public String toString()
    {
        String s =  docReference +  "(" + getOcurrences() + ")";
        return s;
    }


    


    public int getDocReference() {
        return docReference;
    }

    public void setDocReference(int docReference) {
        this.docReference = docReference;
    }

    public int getOcurrences() {
        return ocurrences;
    }

    public void setOcurrences(int ocurrences) {
        this.ocurrences = ocurrences;
    }
    

}
